// Author: Bjorn Schobben

#ifndef PROPERTIES_H
#define PROPERTIES_H

#include "Color.h"

// Properties of a game, or map solver
class Properties
{
public:
	//Constructors
	Properties(int colorCount = DEFAULTCOLORS);
	Properties(const Properties& rhs);

	//Destructor
	virtual ~Properties();

	//Operations on the color count
	unsigned int GetColorCount() const;
	void SetColorCount(unsigned int colorCount);
	bool IsColorsUnique() const;

	//Operations on the color list
	Color GetColor(int index) const;
	void SetColor(int index, Color color);

	//Overloaded operators
	Properties& operator=(const Properties& rhs);



protected:
	//The maximum amount of colors the player can use
	static const unsigned int MAXCOLOR = 6;
	//The minimum amount of colors the player can use
	static const unsigned int MINCOLOR = 4;
	//The default amount of colors the player can use
	static const unsigned int DEFAULTCOLORS = 4;
	
private:
	//Help operations
	void Copy(const Properties& properties);
	Color DefaultColor(int i) const;
	void InitializeDefaultColors();

	//The amount of colors in the list of colors
	unsigned int colorCount;
	//The list of colors
	Color colors[MAXCOLOR];
};

#endif //PROPERTIES_H